package start.demo01.datatype;

import org.junit.Test;

import java.util.TreeSet;

public class SetTest {

    @Test
    public void to(){
        short a=1;
        a=a++;
        TreeSet<Integer> set = new TreeSet<Integer>();
        TreeSet<Integer> subSet = new TreeSet<Integer>();
        for(int i=606;i<613;i++){
            if(i%2==0){
                set.add(i);
            }
        }
        subSet = (TreeSet)set.subSet(608, true, 611, true);
        set.add(699);
        subSet.add(611);
        System.out.println(set+" "+subSet);
    }
}
